<?php /* Smarty version Smarty-3.1.18, created on 2015-05-13 13:49:41
         compiled from "/data/www/mystery/protected/views/schedule/index.tpl" */ ?>
<?php /*%%SmartyHeaderCode:91529493354bf2317a695d7-54154482%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '5eb9937beef86fed48d58cfb1086a6d19d1e41be' => 
    array (
      0 => '/data/www/mystery/protected/views/schedule/index.tpl',
      1 => 1423529984,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '91529493354bf2317a695d7-54154482',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.18',
  'unifunc' => 'content_54bf2317a98bf3_39747210',
  'variables' => 
  array (
    'list' => 0,
    'val' => 0,
    'page' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_54bf2317a98bf3_39747210')) {function content_54bf2317a98bf3_39747210($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ('../common/head.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<script>
//删除
function del(staff_id){
    if (confirm('确定删除？')) 
    {
        $.getJSON('/schedule/del',{staff_id:staff_id},function(res){
            if (res.status==1) {
                alert('操作成功');
                $('#staff_'+staff_id).remove();
                return false;
            }
            alert('操作失败');
        });
    }
    return false;
}

//排班
function schedule(staff_id){
    $.layer({
        type: 2,
        shadeClose: true,
        title: false,
        closeBtn: [0, true],
        shade: [0.8, '#000'],
        border: [0],
        offset: ['150px',''],
        area: ['650px', '300px'],
        iframe: {src: '/schedule/plan?staff_id='+staff_id}
    }); 
}
//排班
function detail(staff_id){
    $.layer({
        type: 2,
        shadeClose: true,
        title: false,
        closeBtn: [0, true],
        shade: [0.8, '#000'],
        border: [0],
        offset: ['150px',''],
        area: ['950px', '200px'],
        iframe: {src: '/schedule/detail?staff_id='+staff_id}
    }); 
}

</script>
<div class="main w1060">
		<div class="pbbg"><a href="/schedule/add">新增员工</a></div>
		
		<div class="biaoge">   
			<table width="100%" border="0" cellspacing="0">
			  <tr>
			  	<td class="btzong3"><strong>姓名</strong></td>
				<td class="btzong3"><strong>岗位</strong></td>
				<td class="btzong3"><strong>工号</strong></td>
				<td class="btzong3"><strong>是否临柜</strong></td>
				<td class="btzong3"><strong>是否调岗</strong></td>
				<td class="btzong3"><strong>调动后岗位</strong></td>
				<td class="btzong3"><strong>调动时间</strong></td>
			    <td class="btzong3"><strong>班次安排</strong></td>
			    <td class="btzong3"><strong>相片</strong></td>
			    <td class="btzong3"><strong>操作</strong></td>
			  </tr>
                          <?php  $_smarty_tpl->tpl_vars['val'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['val']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['list']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['val']->key => $_smarty_tpl->tpl_vars['val']->value) {
$_smarty_tpl->tpl_vars['val']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['val']->key;
?>
			  <tr id="staff_<?php echo $_smarty_tpl->tpl_vars['val']->value['staff_id'];?>
">
				<td><?php echo $_smarty_tpl->tpl_vars['val']->value['staff_name'];?>
</td>
                                <td><?php echo $_smarty_tpl->tpl_vars['val']->value['station'];?>
</td>
				<td><?php echo $_smarty_tpl->tpl_vars['val']->value['staff_identifier'];?>
</td>
				<td><?php if ($_smarty_tpl->tpl_vars['val']->value['temporary']==1) {?>是<?php } else { ?>否<?php }?></td>
				<td><?php if ($_smarty_tpl->tpl_vars['val']->value['shift']==1) {?>是<?php } else { ?>否<?php }?></td>
                                <td><?php if ($_smarty_tpl->tpl_vars['val']->value['new_station']) {?><?php echo $_smarty_tpl->tpl_vars['val']->value['new_station'];?>
<?php }?></td>
				<td><?php if ($_smarty_tpl->tpl_vars['val']->value['shift_time']) {?><?php echo $_smarty_tpl->tpl_vars['val']->value['shift_time'];?>
<?php }?></td>
                                <td><a href="javascript:;" onclick="detail(<?php echo $_smarty_tpl->tpl_vars['val']->value['staff_id'];?>
);">查看排班</a></td>
                                <td><?php if ($_smarty_tpl->tpl_vars['val']->value['photo']) {?><img src="<?php echo $_smarty_tpl->tpl_vars['val']->value['photo'];?>
" width="31" height="30" alt="" /><?php }?></td>
                                <td>
                                    <a href="/schedule/add?staff_id=<?php echo $_smarty_tpl->tpl_vars['val']->value['staff_id'];?>
">编辑</a>&nbsp;&nbsp;
                                    <a href="javascript:;" onclick="schedule(<?php echo $_smarty_tpl->tpl_vars['val']->value['staff_id'];?>
);">排班</a>&nbsp;&nbsp;
                                    <a href="javascript:;" onclick="del(<?php echo $_smarty_tpl->tpl_vars['val']->value['staff_id'];?>
);">删除</a>
                                </td>
			  </tr>
                          <?php } ?>
		  </table>
		</div>
		<div style="float:right;">
			<?php echo $_smarty_tpl->tpl_vars['page']->value;?>

		</div>
		
</div>
<?php echo $_smarty_tpl->getSubTemplate ("../common/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
<?php }} ?>
